package file;

import java.io.File;

/**
 * User: heihaier@xfuweng.com
 * Date: 2015/7/6
 * Time: 11:49
 */
public class FileTest {

    public static void main(String[] args) {

        File file = new File("E:\\test\\mongodb");

        System.out.println(file.getName());
        System.out.println(file.getAbsoluteFile());
        System.out.println(file.getAbsolutePath());
        System.out.println(file.getPath());
        System.out.println(file.getParent());
        System.out.println(file.getParentFile());
        System.out.println(file.isFile());
        System.out.println(file.isDirectory());
        System.out.println(file.isAbsolute());
        System.out.println(file.lastModified());

        for (File file1 : file.listRoots()) {
            System.out.println(file1);
        }

        for (String s : file.list(new FileFilter())) {

            System.out.println(s);
        }
        ;

    }
}
